<template>
    <div class="sign_detail activity">
        <navbar>报名详情</navbar>
        <div class="wrapper2" :class="{ 'wrapper': detail.data.status==2 || detail.data.status==3 && detail.data.can_reward>0 }" v-if="detail.data">
          <div class="content register_detail">
            <div class="status">
              <h2 :class="{ 'fade': detail.data.status==3 }">{{ detail.data.status | ac_status_txt }}</h2>
              <div class="forwardIcon info" @click="jump_detail">
                <h3>{{ detail.data.title }}</h3>
                <p>{{ detail.data.subtitle }}</p>
              </div>
            </div>
            <dl class="acInfo">
              <dt>活动信息</dt>
              <dd class="mx-1px-top">
                <span>时间</span>
                <p>{{ detail.data.starts_at | time(detail.data.ends_at) }}</p>
              </dd>
              <dd>
                <span>地点</span>
                <p>{{ detail.data.address }}</p>
              </dd>
              <dd @click="jump('sign_list')">
                <span>报名人</span>
                <p class="forwardIcon">已签到{{ detail.data.signed_count }}人 / {{ detail.data.member_count }}人报名</p>
              </dd>
            </dl>
            <dl class="acInfo" v-if="detail.data.can_sign===true && detail.meta">
              <dt class="mx-1px-bottom"><div>签到码</div></dt>
              <dd>
                <div class="code-wrap">
                  <img :src="detail.meta.img_src">
                  <p>会员扫码签到</p>
                </div>
              </dd>
            </dl>
            <dl class="endTxt" v-if="detail.data.status==3 && detail.data.can_reward>0">
              <dd>
                <p>活动已结束，<br>快来奖励表现出色的会员吧！</p>
                <p class="p2">奖励权限将于{{ detail.data.can_reward_limit }}失效<br />还可奖励{{ detail.data.can_reward }}积分</p>
              </dd>
            </dl>
          </div>
          <div class="bottomBar">
            <button class="orange" @click="jump('sign_list')" v-if="detail.data.status==2">查看报名人</button>
            <button class="red" @click="jump('reward_points')"  v-if="detail.data.status==3 && detail.data.can_reward>0">奖励积分</button>
          </div>
        </div>
      </div>
</template>


<script type="text/ecmascript-6">
  import js from '../../../../cores/coach/sign_detail.vue';

  export default {
    extends: js
  }
</script>
<style rel="stylesheet/less" lang="less">
  @import "../../../../styles/ot.less";
</style>
